<?php
require_once 'pages/TMSBackOfficePage.inc';
require_once 'import/importer.inc';

class TMSImportPage extends TMSBackOfficePage {
/**
 * @var IImporter
 */	
	protected $_ioc_importer_;
	
	public function http_Import(){
		$opts = $this->Importer->Options();
		$params = array();
		foreach ($opts as $o){
			$nm = $o->Name();
			if (isset($this->request->$nm))
				$params[$nm] = $this->request->$nm;
		}
		$this->Importer->Import($params);
	}
	
	public function Options(){
		return $this->Importer->Options();
	}
}